//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Research.DataLayer
{
    /// <summary>
    /// Interface used to track extra relationship parameters
    /// </summary>
    public interface IExtraRelationData
    {
        /// <summary>
        /// Returns the ID of the child of the relationship
        /// </summary>
        Guid ParentID { get; }

        /// <summary>
        /// Returns the ID of the child of the relationship
        /// </summary>
        Guid ChildID { get; }

        /// <summary>
        /// Returns the parent of the relationship
        /// </summary>
        IObject ParentObj { get; }

        /// <summary>
        /// Returns the child of the relationship
        /// </summary>
        IObject ChildObj { get; }

        /// <summary>
        /// Returns the type of the child of the relationship
        /// </summary>
        Connection.Storage ChildType { get; }

        /// <summary>
        /// Extra object specific relationship parameters to be stored in the backend
        /// </summary>
        List<Parameter> ExtraData { get; }

        /// <summary>
        /// Copies the relation to another data store
        /// </summary>
        /// <param name="target"></param>
        /// <param name="targetParent"></param>
        /// <param name="targetChild"></param>
        IObject CopyTo(Connection target, IObject targetParent, IObject targetChild);
    }
}
